﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="admin_User_Search" %>
<%@ MasterType VirtualPath="~/admin/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="Server">
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>用户管理
        <small>用户管理</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-user"></i>用户管理</a></li>
                <li class="active">搜索结果</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">

            <!-- Your Page Content Here -->
            <div class="row">
                <div class="col-md-3">
                    <div class="box box-solid">
                        <div class="box-header with-border">
                            <h3 class="box-title">用户管理</h3>

                            <div class="box-tools">
                                <button type="button" class="btn btn-box-tool" data-widget="collapse">
                                    <i class="fa fa-minus"></i>
                                </button>
                            </div>
                        </div>
                        <div class="box-body no-padding">
                            <ul class="nav nav-pills nav-stacked">
                                <li><a href="Default.aspx"><i class="fa fa-circle-o"></i>所有用户</a></li>
                                <li><a href="Writer.aspx"><i class="fa fa-circle-o"></i>新闻编辑者</a></li>
                                <li><a href="Ban.aspx"><i class="fa fa-circle-o"></i>黑名单</a></li>
                            </ul>
                        </div>
                        <!-- /.box-body -->
                    </div>
                </div>
                <div class="col-md-9">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">用户搜索结果</h3>

                            <div class="box-tools pull-right" style="margin-right:48px">
                                <div class="has-feedback" style="width:177px">
                                    <asp:TextBox ID="TextBox1" runat="server" CssClass="form-control input-sm" placeholder="搜索用户名 ..."></asp:TextBox>
                                    <span class="glyphicon glyphicon-search form-control-feedback"></span>
                                </div>
                            </div>
                            <div class="box-tools pull-right">
                                <asp:Button ID="Button1" runat="server" Text="搜索" CssClass="btn btn-default btn-sm" Height="30" OnClick="Search" />
                            </div>
                            <!-- /.box-tools -->
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body no-padding">
                            <div class="table-responsive mailbox-messages">
                                <asp:GridView ID="GridView1" runat="server" PageSize="20" AutoGenerateColumns="False" AllowPaging="True" CssClass="table table-striped" GridLines="None" OnPageIndexChanging="GridView1_PageIndexChanging" EmptyDataText="搜索结果为空！">
                                    <Columns>
                                        <asp:TemplateField HeaderText="#">
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# this.GridView1.PageIndex * this.GridView1.PageSize + this.GridView1.Rows.Count + 1%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="用户名" ItemStyle-CssClass="mailbox-name">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl=<%# "~/admin/User/Show.aspx?id="+Eval("id") %> ><asp:Label ID="Label2" runat="server" Text='<%# Eval("name") %>' /></asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="注册邮箱" ItemStyle-CssClass="mailbox-subject">
                                            <ItemTemplate>
                                                <b><asp:Label ID="Label3" runat="server" Text='<%# Eval("email") %>' /></b>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="用户类型" ItemStyle-CssClass="mailbox-date">
                                            <ItemTemplate>
                                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("display_name") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="加入时间" ItemStyle-CssClass="mailbox-date">
                                            <ItemTemplate>
                                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("created_at") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerTemplate>
                                        <div class="mailbox-controls">
                                            <div class="pull-right">
                                                <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                                                <div class="btn-group">
                                                    <asp:LinkButton ID="lbnFirst" runat="Server" CssClass="btn btn-default" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>' CommandName="Page" CommandArgument="First"></asp:LinkButton>
                                                    <asp:LinkButton ID="lbnPrev" runat="server" CssClass="btn btn-default" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>' CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                                                    <asp:LinkButton ID="lbnNext" runat="Server" CssClass="btn btn-default" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>' CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                                                    <asp:LinkButton ID="lbnLast" runat="Server" CssClass="btn btn-default" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>' CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                                                </div>
                                            </div>
                                        </div>
                                    </PagerTemplate>
                                </asp:GridView>
                            </div>
                        </div>
                        <!-- /.box-body -->
                    </div>
                </div>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="Server">
</asp:Content>

